'''
Created on 26 mai 2011

@author: rdionisi
'''
from django.contrib import admin
from wikiproduct.models import Product, ProductIngredient, ProductPackaging, \
    Ingredient, Packaging, Company, ProductIngredientAttribute, IngredientAttribute

class ProductAdmin(admin.ModelAdmin):
    list_display = ('name', 'detail', 'company','version')
    list_filter = ['pub_date']
    
class IngredientAdmin(admin.ModelAdmin):
    list_display = ('name', 'detail', 'rating', 'version')
    
class PackagingAdmin(admin.ModelAdmin):
    list_display = ('name', 'detail', 'rating', 'version')
    
class CompanyAdmin(admin.ModelAdmin):
    list_display = ('name', 'detail', 'version')
    
class ProductPackagingAdmin(admin.ModelAdmin):
    list_display = ('packaging', 'product', 'version')
    
class ProductIngredientAdmin(admin.ModelAdmin):
    list_display = ('ingredient', 'product', 'version')

admin.site.register(ProductIngredient,ProductIngredientAdmin)
admin.site.register(ProductPackaging,ProductPackagingAdmin)
admin.site.register(Product,ProductAdmin)
admin.site.register(Ingredient,IngredientAdmin)
admin.site.register(Packaging,PackagingAdmin)
admin.site.register(Company,CompanyAdmin)
admin.site.register(ProductIngredientAttribute)
admin.site.register(IngredientAttribute)


